package com.yoke.common.base;

import com.yoke.common.interceptor.BaseInterceptor;
import com.yoke.system.SystemBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * Created by Administrator on 2017/5/16.
 */
public abstract class NginxBaseControl extends AbstractBaseControl {
    protected String userName;
//    protected static String confPath;
//    protected static String bootPath;//= SystemBean.getInstance().getEnvironment().getProperty("boot.conf");
//    @Resource
//    BaseService baseService;

    @Override
    public void setReqAndRes(HttpServletRequest request, HttpSession session, HttpServletResponse response) {
        super.setReqAndRes(request, session, response);
        this.userName = BaseInterceptor.getNowUserName();
//        if (confPath == null)
//            confPath =
//        if (bootPath == null)
//            bootPath =
    }

    protected String getConfPath() {
        return SystemBean.getInstance().getEnvironment().getProperty("nginx.conf");
    }

    protected String getBootPath() {
        return SystemBean.getInstance().getEnvironment().getProperty("boot.conf");
    }

}
